cmake_minimum_required(VERSION 2.8)

project(Everest_Test_DBC_ODBC)

SET(CMAKE_SOURCE_DIR .)
SET(CMAKE_CXX_FLAGS_DEBUG "$ENV{CXXFLAGS} -O0 -Wall -g -ggdb -fpermissive")
SET(CMAKE_CXX_FLAGS_RELEASE "$ENV{CXXFLAGS} -O2 -Wall -fpermissive")
SET(CMAKE_BUILD_TYPE DEBUG)

add_executable(test_env test_environment.cpp)
target_link_libraries(test_env cppunit odbc EverestORM)

add_executable(test_con test_connection.cpp)
target_link_libraries(test_con cppunit odbc EverestORM)

add_executable(test_stm test_statement.cpp)
target_link_libraries(test_stm cppunit odbc EverestORM)

add_executable(test_param test_parameter.cpp)
target_link_libraries(test_param cppunit odbc EverestORM)

add_executable(test_recordset test_recordset.cpp)
target_link_libraries(test_recordset cppunit odbc EverestORM)


enable_testing()
add_test(NAME test_env  COMMAND test_env)
add_test(NAME test_con  COMMAND test_con)
add_test(NAME test_stm  COMMAND test_stm)
add_test(NAME test_param  COMMAND test_param)

